﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InPatientController;

namespace HPMDesktop.Patient.Controls
{
    public partial class PatientWardControl : UserControl
    {
        public PatientWardControl()
        {
            InitializeComponent();
        }

        private void cmdCancel_Click(object sender, EventArgs e)
        {
            //this.Close();
        }

        private void cmdSave_Click(object sender, EventArgs e)
        {
            /*bool result;
            string CRNumber = "AX101"; //Get CRNumber from global variable.

            PatientWard objData = new PatientWard();
            PatientWard_Mapper objMapper = new PatientWard_Mapper();

            try
            {
                objData.CRNumber = Convert.ToString(CRNumber);
                objData.wardname = Convert.ToString(wardname.Text);
                objData.bedNumber = Convert.ToString(bedNumber.Text);
                objData.startDate = startDate.Text;
                objData.startTime = Convert.ToString(startTime.Text);
                objData.endDate = endDate.Text;
                objData.endTime = Convert.ToString(endTime.Text);

                result = objMapper.Load_PatientWard_DATA(objData.CRNumber, objData);
            }
            catch (Exception ex)
            {

            }
            finally
            {
                objData.Dispose();
                objMapper.Dispose();

            }*/

        }

        private void PatientWardControl_Load(object sender, EventArgs e)
        {
            /*string CRNumber;
            CRNumber = "AX101";

            PatientWard objData = new PatientWard();
            PatientWard_DataLoader objDataLoader = new PatientWard_DataLoader();

            try
            {

                objData = objDataLoader.Get_PatientWard_DATA(CRNumber);

                wardname.Text = Convert.ToString(objData.wardname);
                bedNumber.Text = Convert.ToString(objData.bedNumber);
                startDate.Text = Convert.ToString(objData.startDate);
                startTime.Text = Convert.ToString(objData.startTime);
                endDate.Text = Convert.ToString(objData.endDate);
                endTime.Text = Convert.ToString(objData.endTime);
            }
            catch (Exception ex)
            {

            }
            finally
            {
                objData.Dispose();
                objDataLoader.Dispose();

            }*/
        }
    }
}